home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / getselect.z / getselect
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))                                      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_GetSelection - retrieve the contents of a selection
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      int
  15.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn(_i_n_t_e_r_p, _t_k_w_i_n, _s_e_l_e_c_t_i_o_n, _t_a_r_g_e_t, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  16.  
  17. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  18.      Tcl_Interp      *_i_n_t_e_r_p      (in)      Interpreter to use for reporting
  19.                                             errors.
  20.  
  21.      Tk_Window       _t_k_w_i_n        (in)      Window on whose behalf to retrieve
  22.                                             the selection (determines display
  23.                                             from which to retrieve).
  24.  
  25.      Atom            _s_e_l_e_c_t_i_o_n    (in)      The name of the selection to be   |
  26.                                             retrieved.
  27.  
  28.      Atom            _t_a_r_g_e_t       (in)      Form in which to retrieve
  29.                                             selection.
  30.  
  31.      Tk_GetSelProc   *_p_r_o_c        (in)      Procedure to invoke to process
  32.                                             pieces of the selection as they
  33.                                             are retrieved.
  34.  
  35.      ClientData      _c_l_i_e_n_t_D_a_t_a   (in)      Arbitrary one-word value to pass
  36.                                             to _p_r_o_c.
  37.  
  38.  
  39. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  40.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn retrieves the selection specified by the atom _s_e_l_e_c_t_i_o_n  |
  41.      in the format specified by _t_a_r_g_e_t.  The selection may actually be        |
  42.      retrieved in several pieces; as each piece is retrieved, _p_r_o_c is called  |
  43.      to process the piece.  _P_r_o_c should have arguments and result that match  |
  44.      the type TTTTkkkk____GGGGeeeettttSSSSeeeellllPPPPrrrroooocccc:
  45.           typedef int Tk_GetSelProc(
  46.                ClientData _c_l_i_e_n_t_D_a_t_a,
  47.                Tcl_Interp *_i_n_t_e_r_p,
  48.                char *_p_o_r_t_i_o_n);
  49.      The _c_l_i_e_n_t_D_a_t_a and _i_n_t_e_r_p parameters to _p_r_o_c will be copies of the
  50.      corresponding arguments to TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn.  _P_o_r_t_i_o_n will be a pointer to
  51.      a string containing part or all of the selection.  For large selections,
  52.      _p_r_o_c will be called several times with successive portions of the
  53.      selection.  The X Inter-Client Communication Conventions Manual allows a
  54.      selection to be returned in formats other than strings, e.g. as an array
  55.      of atoms or integers.  If this happens, Tk converts the selection back
  56.      into a string before calling _p_r_o_c.  If a selection is returned as an
  57.      array of atoms, Tk converts it to a string containing the atom names
  58.      separated by white space.  For any other format besides string, Tk
  59.      converts a selection to a string containing hexadecimal values separated
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))                                      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      by white space.
  75.  
  76.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn returns to its caller when the selection has been
  77.      completely retrieved and processed by _p_r_o_c, or when a fatal error has
  78.      occurred (e.g. the selection owner didn't respond promptly).
  79.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn normally returns TCL_OK;  if an error occurs, it returns
  80.      TCL_ERROR and leaves an error message in _i_n_t_e_r_p->_r_e_s_u_l_t.  _P_r_o_c should
  81.      also return either TCL_OK or TCL_ERROR. If _p_r_o_c encounters an error in
  82.      dealing with the selection, it should leave an error message in _i_n_t_e_r_p-
  83.      >_r_e_s_u_l_t and return TCL_ERROR;  this will abort the selection retrieval.
  84.  
  85.  
  86. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  87.      format, get, selection retrieval
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.